package com.slz3.business.module.orderManagement.ordOrderLine.steward;

import com.slz3.business.module.orderManagement.ordOrderLine.domain.OrdOrderLine;
import com.slz3.business.module.orderManagement.ordOrderLine.domain.OrdOrderLineCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class OrdOrderLineResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(OrdOrderLine.class).flatMap(ordOrderLine ->
                OrdOrderLineResController.add(req, ordOrderLine)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.delete(req, ordOrderLineCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(OrdOrderLine.class).flatMap(ordOrderLine ->
                OrdOrderLineResController.modify(req, ordOrderLine)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return OrdOrderLineResController.list(req);
    }

    public static Mono<ServerResponse> findBySerOrderId(ServerRequest req) {
        return OrdOrderLineResController.findBySerOrderId(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return OrdOrderLineResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return OrdOrderLineResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.auditSubmit(req, ordOrderLineCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.audit(req, ordOrderLineCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.auditReject(req, ordOrderLineCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.usingEnable(req, ordOrderLineCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(OrdOrderLineCondition.class).flatMap(ordOrderLineCondition ->
                OrdOrderLineResController.usingDisable(req, ordOrderLineCondition)
        );
    }   

}
